#include "pch.h"
#include "CommandLink.h"
#include "WidgetImpl.h"
#include "WinException.h"

using namespace Gui;




CommandLink::CommandLink(const std::wstring& text, const std::wstring& note, Widget* parent)
	: Button(parent, L"BUTTON", text, math::int2(0, 0), math::int2(10, 10), WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_COMMANDLINK)
{
	setNote(note);
	setSize(optimalSize());
}
///////////////////////////////////////////////////////////////////////////////////////////////////




void CommandLink::setNote(const std::wstring& note)
{
	/// The fucking msdn doesn't state what this message should return
	SendMessage(d->hWnd, BCM_SETNOTE, 0, (LPARAM)note.c_str());
}
///////////////////////////////////////////////////////////////////////////////////////////////////
